import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

const state = {
  token: "",
  iflogin: false,
  ifpop: false
};
const mutations = {
  changeToken(state, str) {
    state.token = str;
    window.sessionStorage.setItem("token", str);
  },
  changeLogin(state, str) {
    state.iflogin = str;
    window.sessionStorage.setItem("iflogin", str);
  },
  changePop(state, str) {
    state.ifpop = str;
  },
};
const actions = {

};
const store = new Vuex.Store({
  state: state,
  mutations: mutations,
  actions: actions
});

export default store;
